const express = require('express')
const app = express()

app.get('/', (req, res) => {
    const newName = req.query.name.replace('a', 'b')
    res.send(newName)
})
function errHandle(err, req, res, next) {
    console.log(err.stack);
    res.send('后端出错了,请稍后重试')
}

app.use(errHandle)


app.listen(8000, () => { console.log('8000开启成功'); })